import Mock from "mockjs"

const listData = [
    {
        id: "001",
        title: "习近平谈治国理政",
        label: "政治",
        author: "习近平",
    },
    {
        id: "002",
        title: "明朝那些事儿",
        label: "历史",
        author: "当年明月",
    },
    {
        id: "003",
        title: "Vue3.x",
        label: "计算机",
        author: "尤雨溪",
    }, {
        id: "001",
        title: "习近平谈治国理政",
        label: "政治",
        author: "习近平",
    },
    {
        id: "002",
        title: "明朝那些事儿",
        label: "历史",
        author: "当年明月",
    },
    {
        id: "003",
        title: "Vue3.x",
        label: "计算机",
        author: "尤雨溪",
    },
]

Mock.mock("http://myMock/list", "get", listData)

const mockTest = Mock.mock({
    "star|3": "★★★",
    "number|1-100": 1000,
    "object|2": {
        310000: "上海市",
        320000: "j江苏省",
        330000: "浙江省",
        340000: "安徽省",
    },
    "array|1": ["AMD", "CMD", "UMD"],
    date: `${Mock.mock("@date")} ${Mock.mock("@time")}`,
    color: Mock.mock("@color"),
    msg: Mock.mock("@cparagraph"),
    name: Mock.mock("@cname"),
})
Mock.mock("/test", "get", mockTest)